<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>float的实例和注意事项</title>
  <style>
    *{
      margin: 0px;
      padding: 0px;
    }
    *.clear {
      clear: both;
    }
    #container {
      border:1px solid red;
      width: 1200px;
      margin: auto;
    }
    #top {
      height:80px;
      background: #933;
      color: #fff;
    }
    #content {
      width: 1200px;
    }
    #lc {
      width: 390px;
      border:1px solid red;
      height: 400px;
      float: left;
      margin-right:5px;
    }
    #cc {
      width: 390px;
      border:1px solid gray;
      height: 400px;
      float: left;
      margin-right:5px;
    }
    #rc {
      width: 390px;
      border:1px solid green;
      height: 400px;
      float: left;
    }
    #bottom {
      background: #666;
      height:80px;
    }
  </style>
</head>
<body>
  <div id="container">
    <div id="top">顶部</div>
    <div id="content">
      <div id="lc">左边内容</div>
      <div id="cc">中间的内容</div>
      <div id="rc">右边内容</div>
      <div class="clear"></div>
    </div>
    <div id="bottom">底部</div>
  </div>
</body>
</html>